import { defineConfig } from 'unocss'
import presetUno from '@unocss/preset-uno'
import presetIcons from '@unocss/preset-icons'

export default defineConfig({
  presets: [
    presetUno(),
    presetIcons({
      extraProperties: {
        display: 'inline-block',
        'vertical-align': 'middle'
      }
    })
  ],
  rules: [
    // border-el -> var(--el-border-color)
    // border-el-light -> var(--el-border-color-light)
    [/^border-el(.+)$/, ([, d]) => ({ 'border-color': `var(--el-border-color${d})` })],
    // color-el -> var(--el-text-color)
    // color-el-placeholder -> var(--el-text-color-placeholder)
    [/^color-el(.+)$/, ([, d]) => ({ color: `var(--el-text-color${d})` })]
  ]
})
